namespace InfoLogic.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class PRODUCT_TABLE_ADDED : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Product",
                c => new
                    {
                        ProductId = c.Guid(nullable: false),
                        productName = c.String(),
                        purchasePrice = c.Double(nullable: false),
                        sellingPrice = c.Double(nullable: false),
                        quantityOnHand = c.Int(nullable: false),
                    })
                .PrimaryKey(t => t.ProductId);
            
            AddColumn("dbo.Business", "Product_ProductId", c => c.Guid());
            AddForeignKey("dbo.Business", "Product_ProductId", "dbo.Product", "ProductId");
            CreateIndex("dbo.Business", "Product_ProductId");
        }
        
        public override void Down()
        {
            DropIndex("dbo.Business", new[] { "Product_ProductId" });
            DropForeignKey("dbo.Business", "Product_ProductId", "dbo.Product");
            DropColumn("dbo.Business", "Product_ProductId");
            DropTable("dbo.Product");
        }
    }
}
